<admintpl file="header" />
</head>
<style>
    #user_info td{
        width: 50%;
    }
    b{
        color: green;
    }
</style>
<body>
<div class="wrap js-check-wrap">
    <form class="form-horizontal js-ajax-form" method="post">
        <fieldset>
            <div class="tabbable">
                <div class="tab-content">
                    <fieldset>
                        <!-- 用户基本信息 -->
                        <h2><span style="color:black;">用户信息</span></h2>
                        <table class="table table-bordered" id="user_info">
                            <tr>
                                <td>姓名</td>
                                <td><b>{$user['name']}</b></td>
                            </tr>
                            <tr>
                                <td>致诚信用分</td>
                                <td><b>{$user['zc_info']['zccreditscore']}</b></td>
                            </tr>
                            <tr>
                                <td>违约概率 取值:0.73%~73.6%</td>
                                <td><b>{$user['zc_info']['contractbreakrate']}</b></td>
                            </tr>
                            <tr>
                                <td>其他机构查询次数</td>
                                <td><b>{$user['zc_info']['timesbyotherorg']}</b></td>
                            </tr>
                            <tr>
                                <td>其他查询机构数</td>
                                <td><b>{$user['zc_info']['otherorgcount']}</b></td>
                            </tr>
                            <tr>
                                <td>本机构查询次数</td>
                                <td><b>{$user['zc_info']['timesbycurrentorg']}</b></td>
                            </tr>
                        </table>
                        <!-- 查询历史 -->
                        <h2><span style="color:black;">查询历史</span></h2>
                        <notempty name="user['history']">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <td>机构名称</td>
                                    <td>查询时间</td>
                                    <td>机构类型</td>
                                    <td>查询原因</td>
                                </tr>
                                </thead>
                                <foreach name="user['history']" item="h">
                                    <tr>
                                        <td>{$h['orgname']}</td>
                                        <td>{$h['time']}</td>
                                        <td>{$h['orgtype']}</td>
                                        <td>{$status[$h['queryreason']]}</td>
                                    </tr>
                                </foreach>
                            </table>
                            <else/>
                            <div>暂无记录</div>
                        </notempty>
                        <!-- 借款记录 -->
                        <h2><span style="color:black;">借款记录</span></h2>
                        <notempty name="user['records']">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <td>机构代号</td>
                                    <td>借款人姓名</td>
                                    <td>借款人身份证号</td>
                                    <td>借款时间</td>
                                    <td>期数</td>
                                    <td>借款金额</td>
                                    <td>审批结果码</td>
                                    <td>还款状态码</td>
                                    <td>借款类型码</td>
                                    <td>逾期金额</td>
                                    <td>逾期情况</td>
                                    <td>历史逾期总次数</td>
                                    <td>历史逾期 M3+次数</td>
                                    <td>历史逾期 M6+次数</td>
                                </tr>
                                </thead>
                                <foreach name="user['records']" item="r">
                                    <tr>
                                        <td>{$r['orgname']}</td>
                                        <td>{$r['name']}</td>
                                        <td>{$r['certno']}</td>
                                        <td>{$r['loandate']}</td>
                                        <td>{$r['periods']}</td>
                                        <td>{$r['loanamount']}</td>
                                        <td>{$r['approvalstatuscode']}</td>
                                        <td>{$r['loanstatuscode']}</td>
                                        <td>{$r['loantypecode']}</td>
                                        <td>{$r['overdueamount']}</td>
                                        <td>{$r['overduestatus']}</td>
                                        <td>{$r['overduetotal']}</td>
                                        <td>{$r['overduem3']}</td>
                                        <td>{$r['overduem6']}</td>
                                    </tr>
                                </foreach>
                            </table>
                            <else/>
                            <div>暂无记录</div>
                        </notempty>
                        <!-- 风险记录 -->
                        <h2><span style="color:black;">风险记录</span></h2>
                        <notempty name="user['risk']">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <td>机构代号</td>
                                    <td>命中项码</td>
                                    <td>命中内容</td>
                                    <td>风险类别码</td>
                                    <td>风险最近时间</td>
                                </tr>
                                </thead>
                                <foreach name="user['risk']" item="rs">
                                    <tr>
                                        <td>{$rs['orgname']}</td>
                                        <td>{$rs['riskitemtypecode']}</td>
                                        <td>{$rs['riskitemvalue']}</td>
                                        <td>{$rs['risktypecode']}</td>
                                        <td>{$rs['risktime']|date='Y-m-d H:i:s',###}</td>
                                    </tr>
                                </foreach>
                            </table>
                            <else/>
                            <div>暂无记录</div>
                        </notempty>
                    </fieldset>
                </div>
            </div>

            <div class="form-actions">
                <!-- <button class="btn btn-primary js-ajax-submit" type="submit" data-types='1' data-action="{:U('Examine/set_exam',array('display'=>1))}" data-msg='确认已还款?' data-subcheck="true">手工确认还款</button> -->
                <!-- <a class="btn btn-primary js-ajax-submit"  href="{:U('Examine/loan_no_due')}" >返回</a> -->
            </div>
        </fieldset>
    </form>

</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>